import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 工具入库单查询
export const queryToolInStorageBill = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/queryToolInStorageBill`, {
  params
});

// 工具出库单查询
export const queryToolOutStorageBill = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/queryToolOutStorageBill`, {
  params
});

// 工具借还汇总查询
export const queryToolBorrowAndReturnSummarizing = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/queryToolBorrowAndReturnSummarizing`, {
  params
});

// 盈亏情况查询
export const queryProfitAndLossSituation = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/queryProfitAndLossSituation`, {
  params
});

// 工具库存动态查询
export const queryToolStockDynamic = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/queryToolStockDynamic`, {
  params
});

// 获取工具信息
export const getToolsList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/getToolsList`, {
  params
});

// 获取仓库信息
export const getStorageList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/getStorageList`, {
  params
});

// 获取对方单位信息
export const getOtherUnitList = params => axios.get(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/getOtherUnitList`, {
  params
});

// 打印工具入库单
export const printInStorageBill = (recevingBillId, inOutStyle) => axios.post(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/printInStorageBill?recevingBillId=${recevingBillId}&inOutStyle=${inOutStyle}`);

// 打印工具出库单
export const printOutStorageBill = (recevingBillId, inOutStyle) => axios.post(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/printOutStorageBill?recevingBillId=${recevingBillId}&inOutStyle=${inOutStyle}`);

// 打印工具借还汇总
export const printBorrowAndReturnBill = (recevingBillId, inOutStyle) => axios.post(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/printBorrowAndReturnBill?recevingBillId=${recevingBillId}&inOutStyle=${inOutStyle}`);

// 打印盈亏情况
export const printProfitAndLossBill = (nMainId) => axios.post(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/printProfitAndLossBill?nMainId=${nMainId}`);

// 打印工具库存动态
export const printStockDynamic = (nSptId) => axios.post(`${SERVER.TOOLMANAGEMENT}/toolQueryStatistics/dedicatedToolQuery/printStockDynamic?nSptId=${nSptId}`);
